#ifndef GAME_H
#define GAME_H
#include "ObjectManager.h"
#include "NetworkManager.h"
class Projectile;
class Game
{
public:
	Game(bool server);
	~Game(void);
	
	void Start(void);
	void Stop(void);
	void ForceStop(void);
	void GameLoop(void);

	void SpawnEnemies(void);
	void SpawnObject(GameObject& obj);

	void ProcessPackets(void);
	bool HandleEvents(void);
	void UpdateObjects(void);
	void RenderAll(void);

	bool CheckCollisions(Projectile* projectile);

private:
	ObjectManager	m_objectManager;
	NetworkManager*	m_networkManager;

	bool			m_gameRunning;
	bool			m_server;
	unsigned int	m_lastSpawn;
	unsigned int	m_killCount;
	unsigned int	m_fpsCounter;
	unsigned int	m_avgFps;
	unsigned int	m_fpsTimer;
};
#endif